<%= if !Enum.member?(@completed, "dismiss") do %>
    <section class="py-6 pl-6 lg:w-80">
        <h2 class="mt-0 text-sm font-semibold">
            Welcome here!<br/>
            Let's discover powerful Azimutt features
        </h2>
        <% actions = Azimutt.Services.OnboardingSrv.items %>
        <% actions_count = actions |> Enum.count() %>
        <% actions_completed = actions |> Enum.count(& @completed |> Enum.member?(&1.id)) %>
        <div class="-mt-3 w-full h-1 bg-gray-200 rounded-full">
            <div class="h-full bg-indigo-600 rounded-full" style={"width: #{100 * actions_completed / actions_count}%"}></div>
        </div>
        <div class="mt-3 space-y-2">
            <%= for action <- actions do %>
                <div class="flex items-start">
                    <%= if @completed |> Enum.member?(action.id) do %>
                        <div class="flex items-center h-6">
                            <svg class="h-5 w-5 border border-indigo-600 rounded-full text-indigo-600" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true">
                                <path fill-rule="evenodd" d="M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z" clip-rule="evenodd" />
                            </svg>
                        </div>
                        <span title={action[:help]} class="ml-3 text-sm leading-6 text-gray-500 line-through"><%= action.label %></span>
                    <% else %>
                        <div class="flex items-center h-6">
                            <div class="h-5 w-5 border border-indigo-600 rounded-full"></div>
                        </div>
                        <span class="ml-3 text-sm leading-6 text-gray-500">
                            <span title={action[:help]}><%= action.label %></span> -
                            <%= form_for @conn, Routes.organization_start_checklist_path(@conn, :check, @organization, action.id), [class: "inline"], fn _f -> %>
                                <%= if action[:manual_check] do %>
                                    <%= submit "done", class: "underline" %>
                                <% else %>
                                    <%= submit "ignore", class: "underline" %>
                                <% end %>
                            <% end %>
                        </span>
                    <% end %>
                </div>
            <% end %>
        </div>
        <%= if actions_count == actions_completed do %>
            <p class="mt-3 text-sm text-gray-500"><b>WoW!</b> You completed the whole list 🥳</p>
            <%= form_for @conn, Routes.organization_start_checklist_path(@conn, :check, @organization, "dismiss"), [], fn _f -> %>
                <%= submit "Close the getting started checklist", class: "mt-3 w-full rounded bg-indigo-600 px-2 py-1 text-xs font-semibold text-white shadow-sm hover:bg-indigo-500 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-indigo-600" %>
            <% end %>
        <% else %>
            <%= form_for @conn, Routes.organization_start_checklist_path(@conn, :check, @organization, "dismiss"), [], fn _f -> %>
                <%= submit "Dismiss", class: "mt-3 w-full px-2 py-1 text-sm font-semibold text-gray-400 rounded shadow-sm ring-1 ring-inset ring-gray-200 hover:bg-white hover:text-gray-500" %>
            <% end %>
        <% end %>
    </section>
<% end %>
